home *** CD-ROM | disk | FTP | other *** search
- property mySprite, myType, myName, myNameDown, myNameOver, myNameInactive, Active, ancestor, displaySprite, myStuffToPurchase
-
- on beginSprite me
- global gActorListMan
- mySprite = me.spriteNum
- myName = (the member of sprite mySprite).name
- myNameDown = word 1 of myName && "down"
- myNameOver = word 1 of myName && "over"
- myNameInactive = word 1 of myName && "Inactive"
- Active = 1
- lookForToolTip = 1
- ancestor = new(script("FourStatebuttonActions"), lookForToolTip)
- myType = #selectButton
- registerSprite(gActorListMan, mySprite)
- end
-
- on mouseUp me
- global gClickSprite, gConMan
- if voidp(displaySprite) then
- displaySprite = sendAllSprites(#sendSpriteNum, #IntDisplay)
- end if
- if not Active then
- exit
- end if
- if gClickSprite = mySprite then
- doButtonUpClick(myType, 1)
- userChoice = sendSprite(displaySprite, #getCurChoice)
- choiceCost = sendSprite(displaySprite, #getCurCost)
- decision = sendSprite(displaySprite, #getCurDecisionType)
- userInteriorChoice(gConMan, decision, userChoice, choiceCost)
- put userChoice && "selected"
- go(the frame + 1)
- end if
- end
-
- on enterFrame me
- global gConMan
- if voidp(displaySprite) then
- displaySprite = sendAllSprites(#sendSpriteNum, #IntDisplay)
- end if
- curInteriorDecision = getNextInteriorDecision(gConMan)
- curChoice = sendSprite(displaySprite, #getCurChoice)
- if curInteriorDecision = #interiorAmenities then
- if interiorItemPurchased(gConMan, curChoice) then
- if Active then
- setInactive(me)
- end if
- else
- if not Active then
- setActive(me)
- end if
- end if
- else
- if not Active then
- setActive(me)
- end if
- end if
- end
-
- on clearActorList me
- if Active then
- set the member of sprite the mySprite of me to member(myName)
- else
- set the member of sprite the mySprite of me to member(myNameInactive)
- end if
- end
-
- on endSprite me
- global gActorListMan
- unRegisterSprite(gActorListMan, mySprite)
- end
-
- on getPropertyDescriptionList me
- propList = [:]
- rangeList = []
- append(rangeList, #flooring_kitchen)
- append(rangeList, #flooring_bathrooms)
- append(rangeList, #flooring_otherRooms)
- append(rangeList, #fireplaces)
- append(rangeList, #staircases)
- append(rangeList, #kitchen_styles)
- append(rangeList, #kitchen_cabinets)
- append(rangeList, #kitchen_CounterTops)
- append(rangeList, #Bathrooms_styles)
- append(rangeList, #interiorAmenities)
- a = [#comment: "What is being purchased?", #format: #symbol, #range: rangeList, #default: rangeList[1]]
- addProp(propList, #myStuffToPurchase, a)
- return propList
- end
-